//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopCart, MinishopCartResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopCartList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopCartResponse>(`/uctoo/minishop_cart/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopCart = async (id: string) => {
  return requestClient.get<MinishopCart>(`/uctoo/minishop_cart/${id}`);
};

export const adductooMinishopCart = async (data: Partial<MinishopCart>) => {
  return requestClient.post<MinishopCart>('/uctoo/minishop_cart/add', data);
};

export const edituctooMinishopCart = async (data: Partial<MinishopCart>) => {
  return requestClient.post<MinishopCart>('/uctoo/minishop_cart/edit', data);
};

export const deleteuctooMinishopCart = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_cart/del', { id });
};
